X-Git-Url: http://git.cyclocoop.org/%22.%24info%5B?a=blobdiff_plain;f=includes%2Fupload%2FUploadBase.php;h=6a471ba573edfd67170548d66816e2fb298976a4;hb=827cfb3351db57332e16db48bdfbcde6131c17cd;hp=064ca6728c0ce8a86d385c88b62289c32e3d9894;hpb=220bda9175a18458449e9d754fb48830c1f76f25;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php index 064ca6728c..6a471ba573 100644 --- a/includes/upload/UploadBase.php +++ b/includes/upload/UploadBase.php @@ -1397,7 +1397,7 @@ abstract class UploadBase { */ public static function checkXMLEncodingMissmatch( $file ) { global $wgSVGMetadataCutoff; - $contents = file_get_contents( $file, false, null, -1, $wgSVGMetadataCutoff ); + $contents = file_get_contents( $file, false, null, 0, $wgSVGMetadataCutoff ); $encodingRegex = '!encoding[ \t\n\r]*=[ \t\n\r]*[\'"](.*?)[\'"]!si'; if ( preg_match( "!<\?xml\b(.*?)\?>!si", $contents, $matches ) ) { @@ -1864,8 +1864,7 @@ abstract class UploadBase { # look up scanner configuration $command = $wgAntivirusSetup[$wgAntivirus]['command']; $exitCodeMap = $wgAntivirusSetup[$wgAntivirus]['codemap']; - $msgPattern = isset( $wgAntivirusSetup[$wgAntivirus]['messagepattern'] ) ? - $wgAntivirusSetup[$wgAntivirus]['messagepattern'] : null; + $msgPattern = $wgAntivirusSetup[$wgAntivirus]['messagepattern'] ?? null; if ( strpos( $command, "%f" ) === false ) { # simple pattern: append file to scan